package com.hfjyz.tutor.tutorcall.bean;

import com.hfjyz.base.bean.SearchCondition;

public class TutorCallSearchCondition extends SearchCondition {

    public String getOrderString(String call, String tutor) {
        if (sortColumn == null) {
            return "";
        }
        
        if (sortColumn.equals("tutorIdNo")) {
            return " order by " + tutor + ".idNo" + " " + sortDirection;
        }
        if (sortColumn.equals("tutorName")) {
            return " order by " + tutor + ".name" + " " + sortDirection;
        }
        if (sortColumn.equals("tutorSex")) {
            return " order by " + tutor + ".isMale" + " " + sortDirection;
        }
        return " order by " + call + "." + sortColumn + " " + sortDirection;
    }
}
